package pl.edu.agh.logview.model;

import java.util.Date;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "state")
public class State extends AbstractVertex {

	@DatabaseField(generatedId = true)
	private long id;
	
	@DatabaseField(foreign = true)
	private Agent agent;
	
	@DatabaseField
	private String state;
	
	@DatabaseField
	private Date actionTime;

	@DatabaseField
	private String name;	//to co sie wyswietla w wierzcholku
	
	public State() {
		setVertexType(VertexType.VERTEX_STATE);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Agent getAgent() {
		return agent;
	}

	public void setAgent(Agent agent) {
		this.agent = agent;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Date getActionTime() {
		return actionTime;
	}

	public void setActionTime(Date actionTime) {
		this.actionTime = actionTime;
	}

	@Override
	public String toString() {
		return name;
	}
	
}
